package com.bci.pwtz.mysql.dao;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;
import com.bci.pwtz.mysql.model.Dyxl;

public interface DyxlMapper {
    int deleteByPrimaryKey(String deviceid);

    int insert(Dyxl record);

    int insertSelective(Dyxl record);

    Dyxl selectByPrimaryKey(String deviceid);

    int updateByPrimaryKeySelective(Dyxl record);

    int updateByPrimaryKey(Dyxl record);
    
    int deleteById(@Param("deviceid")String deviceid,@Param("lastmodifiedtime")Date time);
    
    List<Dyxl> selectDeviceList(@Param("name")String name,@Param("companyid") Long companyid,@Param("companyids")String[] companyids,@Param("portalType") int portalType,@Param("medLineCodes")String[] medLineCodes,@Param("deviceType")int deviceType,@Param("transformerCode")String transformerCode,@Param("beginTime") String beginTime,@Param("endTime") String endTime,
            @Param("beginIndex") int beginIndex, @Param("pageSize") int pageSize);
    
    int selectDeviceCount(@Param("name")String name,@Param("companyid") Long companyid,@Param("companyids")String[] companyids,@Param("portalType") int portalType,@Param("medLineCodes")String[] medLineCodes,@Param("deviceType")int deviceType,@Param("transformerCode")String transformerCode,@Param("beginTime") String beginTime,@Param("endTime") String endTime);
    
    List<Dyxl> selectByPdbyq(@Param("deviceType") int deviceType,@Param("transformerCode") String transformerCode,@Param("deviceName") String deviceName,@Param("companyId") Long companyId,@Param("benginIndex") int benginIndex, @Param("pageSize") int pageSize);

    List<Dyxl> selectByAllPdbyq(@Param("deviceType") int deviceType,@Param("transformerCode") String transformerCode,@Param("deviceName") String deviceName,@Param("companyId") Long companyId);

    int selectDeviceCountByPdbyq(@Param("deviceType") int deviceType,@Param("transformerCode") String transformerCode,@Param("deviceName") String deviceName,@Param("companyId") Long companyId);
    
    List<Dyxl> selectByBYQ(@Param("transformerCode") String transformerCode);

}